package com.yue92.datalife.common;

import lombok.extern.slf4j.Slf4j;
import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

@Slf4j
public class DynamicDataSource extends AbstractRoutingDataSource
{
    @Override
    protected Object determineCurrentLookupKey()
    {
        Object object = DatabaseContextHolder.getType();
        logger.debug("use type: " + object);
        return object;
    }
}
